Add to_i for Agent postgres compatibility

ms32035 10 anni fa
parent
commit
686694cdd2
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/models/agent.rb

+ 2 - 2
app/models/agent.rb

@@ -266,8 +266,8 @@ class Agent < ActiveRecord::Base
266 266
 
267 267
         agents_to_events = {}
268 268
         Agent.connection.select_rows(sql).each do |receiver_agent_id, source_agent_id, event_id|
269
-          agents_to_events[receiver_agent_id] ||= []
270
-          agents_to_events[receiver_agent_id] << event_id
269
+          agents_to_events[receiver_agent_id.to_i] ||= []
270
+          agents_to_events[receiver_agent_id.to_i] << event_id
271 271
         end
272 272
 
273 273
         event_ids = agents_to_events.values.flatten.uniq.compact